// app.js
import fly from './utils/request'
import './utils/init-leancloud'
App({
  onLaunch() {
    //尝试提取用户信息，存入globalData
    try {
      var value = wx.getStorageSync('userinfo')
      if (value) {
        // Do something with return value
        this.globalData.userInfo = value
      }
    } catch (e) {
      console.log('用户信息提取失败');
      // Do something when catch error
    }
  },
  globalData: {
    userInfo: null
  },
  fly   //全局挂载方法
})
